package org.sbbs.admin.manager.impl;

import jakarta.annotation.PostConstruct;
import org.sbbs.admin.dao.SysRoleRepo;
import org.sbbs.admin.entity.SysRole;
import org.sbbs.admin.manager.SysRoleManager;
import org.sbbs.base.jpa.manager.impl.BaseManagerImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Service;

/**
 *
 * @author jenkins
 */
@Service
@Qualifier("sysRoleManager")
public class SysRoleManagerImpl extends BaseManagerImpl<SysRole, Long, SysRoleRepo> implements SysRoleManager {

    @Autowired
    private SysRoleRepo repo;

    @PostConstruct
    public void init() {
        super.setRepo(repo);
    }

    @Override
    public SysRole getByKey(String key) {
        return repo.findByKey(key);
    }
}
